<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>login</title>
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js">
</script>
<script src="http://malsup.github.com/jquery.form.js"></script>
</head>
<body>
	<form id="form1" method="post" action="#">
		<input name="username" /><input type="submit" value="login"/>
	</form>
</body>
<script type="text/javascript">
$(function () {
    $(":submit").click(function () {
        var options = {
            url: "/user/user/login",
            success: function (data) {
                alert(data);
            }
        };
        $("#form1").ajaxForm(options);
    })
})

</script>
</html>